home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / raytr / r3frls.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  5.3 KB  |  159 lines

  1.  
  2. // JavaScript wrapper for r3frls.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_FRLS_H = 1;
  7. include("real/raytr/r3frbob.js")
  8. include("oops/r3matrix.js")
  9.  
  10.  
  11. var R3CLID_FRLIGHTSOURCE = 455;
  12.  
  13.  
  14.  
  15.  
  16. // Description: The default lighting action done by this class in CASTLIGHT method is the following:
  17. //      1. The object sends R3FRLSM_EVALUATE message to itself with the same parameters * p1,
  18. //      p2, msg as in CASTLIGHT. The derived light source class should set its typical *
  19. //      information to lightray sample (=p1 param) and then inherit to the parent class. * The
  20. //      following channels should have valid values prior to inheriting: * - Ray direction - R3CLID_RAYCHANNEL.
  21. //      The direction of cast light ray. Set a unit vector! * - Distance - R3CLID_ZCHANNEL.
  22. //      From light ray origin to the target point given in * p2's R3CLID_ASCCHANNEL. * *
  23. //      2. When the R3FRLSM_EVALUATE message receives this class, the class does the following actions: *
  24. //      - It initializes p1's R3CLID_ILMCHANNEL (light color). * - It moves the target point i.e.
  25. //      R3CLID_ASCCHANNELin p2 to the corresponding channel * in the lightray sample p1. * - It
  26. //      evaluates materials associated with the light source. * - Then it evaluates possible distance weighting
  27. //      function. * * 4. When control returns back from the parent class R3FRLSM_EVALUATE execution, the
  28. //      derived * light source class can find all relevant light information from the ray samples
  29. //      and can * perform whatever further modifications & tricks. * 5. After abovementioned steps, this
  30. //      class calls the appropriate callback function * given in the message parameter defined below. This
  31. //      illuminates the target point.
  32.  
  33. R3FRLSM_CASTLIGHT = 455000;
  34.  
  35. function mR3FRLSM_CASTLIGHT() {
  36.   DoA(this.r3obj, 455000, 0, R3TID_INTEGER, 0);
  37. }
  38.  
  39.  
  40.  
  41.  
  42. R3FRLSA_Shadows = 455500;
  43. function SetR3FRLSA_Shadows(value) {
  44.   R3Set(this.r3obj, R3FRLSA_Shadows, value, R3TID_INTEGER, 0); 
  45. }
  46.  
  47. function GetR3FRLSA_Shadows() {
  48.   return R3Get(this.r3obj, R3FRLSA_Shadows, R3TID_INTEGER, 0); 
  49. }
  50.  
  51. R3FRLSA_Color = 455501;
  52. function SetR3FRLSA_Color(value) {
  53.   R3Set(this.r3obj, R3FRLSA_Color, value, R3TID_COLOR_RGB, 0); 
  54. }
  55.  
  56. R3FRLSA_WorldSize = 455502;
  57. function SetR3FRLSA_WorldSize(value) {
  58.   R3Set(this.r3obj, R3FRLSA_WorldSize, value, R3TID_FLOAT, 0); 
  59. }
  60.  
  61. R3FRLSA_Falloff = 455503;
  62. function SetR3FRLSA_Falloff(value) {
  63.   R3Set(this.r3obj, R3FRLSA_Falloff, value, R3TID_INTEGER, 0); 
  64. }
  65.  
  66. R3FRLSA_Radius = 455504;
  67. function SetR3FRLSA_Radius(value) {
  68.   R3Set(this.r3obj, R3FRLSA_Radius, value, R3TID_FLOAT, 0); 
  69. }
  70.  
  71. R3FRLSA_HasFixedPosition = 455505;
  72. function GetR3FRLSA_HasFixedPosition() {
  73.   return R3Get(this.r3obj, R3FRLSA_HasFixedPosition, R3TID_INTEGER, 0); 
  74. }
  75.  
  76. R3FRLSA_Position = 455506;
  77. function GetR3FRLSA_Position() {
  78.   return R3Get(this.r3obj, R3FRLSA_Position, R3TID_VECTOR, 0); 
  79. }
  80.  
  81. R3FRLSA_HasFiniteAngle = 455507;
  82. function GetR3FRLSA_HasFiniteAngle() {
  83.   return R3Get(this.r3obj, R3FRLSA_HasFiniteAngle, R3TID_INTEGER, 0); 
  84. }
  85.  
  86. R3FRLSA_Angle = 455508;
  87. function GetR3FRLSA_Angle() {
  88.   return R3Get(this.r3obj, R3FRLSA_Angle, R3TID_FLOAT, 0); 
  89. }
  90.  
  91. R3FRLSA_Direction = 455509;
  92. function GetR3FRLSA_Direction() {
  93.   return R3Get(this.r3obj, R3FRLSA_Direction, R3TID_VECTOR, 0); 
  94. }
  95.  
  96. R3FRLSA_VolumeLighting = 455510;
  97. function SetR3FRLSA_VolumeLighting(value) {
  98.   R3Set(this.r3obj, R3FRLSA_VolumeLighting, value, R3TID_INTEGER, 0); 
  99. }
  100.  
  101. function GetR3FRLSA_VolumeLighting() {
  102.   return R3Get(this.r3obj, R3FRLSA_VolumeLighting, R3TID_INTEGER, 0); 
  103. }
  104.  
  105. R3FRLSA_DiffuseOnly = 455511;
  106. function SetR3FRLSA_DiffuseOnly(value) {
  107.   R3Set(this.r3obj, R3FRLSA_DiffuseOnly, value, R3TID_INTEGER, 0); 
  108. }
  109.  
  110. function GetR3FRLSA_DiffuseOnly() {
  111.   return R3Get(this.r3obj, R3FRLSA_DiffuseOnly, R3TID_INTEGER, 0); 
  112. }
  113.  
  114. R3FRLSA_HasFixedDirection = 455512;
  115. function GetR3FRLSA_HasFixedDirection() {
  116.   return R3Get(this.r3obj, R3FRLSA_HasFixedDirection, R3TID_INTEGER, 0); 
  117. }
  118.  
  119. R3FRLSA_CreatesCaustics = 455513;
  120. function GetR3FRLSA_CreatesCaustics() {
  121.   return R3Get(this.r3obj, R3FRLSA_CreatesCaustics, R3TID_INTEGER, 0); 
  122. }
  123.  
  124. var R3LSDW_CONSTANT = 0;
  125. var R3LSDW_LOCAL = 1;
  126. var R3LSDW_INVLIN = 2;
  127. var R3LSDW_INVSQR = 3;
  128.  
  129.  
  130. function r3Frlightsource () { 
  131.    this.base = r3God;
  132.    if(arguments.length) {
  133.       this.base(R3CLID_FRLIGHTSOURCE, arguments);
  134.    }
  135.    // Methods
  136.    this.CASTLIGHT=mR3FRLSM_CASTLIGHT;
  137.  
  138.    // Attributes
  139.    this.GetShadows=GetR3FRLSA_Shadows;
  140.    this.SetShadows=SetR3FRLSA_Shadows;
  141.    this.SetColor=SetR3FRLSA_Color;
  142.    this.SetWorldSize=SetR3FRLSA_WorldSize;
  143.    this.SetFalloff=SetR3FRLSA_Falloff;
  144.    this.SetRadius=SetR3FRLSA_Radius;
  145.    this.GetHasFixedPosition=GetR3FRLSA_HasFixedPosition;
  146.    this.GetPosition=GetR3FRLSA_Position;
  147.    this.GetHasFiniteAngle=GetR3FRLSA_HasFiniteAngle;
  148.    this.GetAngle=GetR3FRLSA_Angle;
  149.    this.GetDirection=GetR3FRLSA_Direction;
  150.    this.GetVolumeLighting=GetR3FRLSA_VolumeLighting;
  151.    this.SetVolumeLighting=SetR3FRLSA_VolumeLighting;
  152.    this.GetDiffuseOnly=GetR3FRLSA_DiffuseOnly;
  153.    this.SetDiffuseOnly=SetR3FRLSA_DiffuseOnly;
  154.    this.GetHasFixedDirection=GetR3FRLSA_HasFixedDirection;
  155.    this.GetCreatesCaustics=GetR3FRLSA_CreatesCaustics;
  156. }
  157.  
  158. r3Frlightsource.prototype=new r3Frbaseobject;
  159. // r3frls.h_H